<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            *{
                margin: 0px;
                padding: 0px;
                list-style: none;
            }
            ul{
                overflow: hidden;
                margin: 20px auto;
                height: 30px;
                width: 485px;
            }
            li{
                float: left;
                width:120px;
                text-align: center;
                height: 30px;
                line-height: 30px;
                cursor: pointer;
            }
            div{
                width: 476px;
                height: 300px;
                text-align: center;
                line-height: 300px;
                border:1px solid skyblue;
                display: none;
                margin: auto;
            }
            img{
                width: 379px;
                margin: auto;
                margin-top: 31px;
            }
            li.current{
                background:gray;
                color:white;
            }
            div.current{
                display: block;
            }
        </style>
    </head>
    <body>
            <ul>
                <li class="current">咒术回战</li>
                <li>进击的巨人</li>
                <li>狂赌之渊</li>
                <li>Hello World</li>
            </ul>
        <section>
            <div class="current">
          <a href="https://www.bilibili.com/bangumi/play/ss34430/?from=search&seid=8522200243286535833"> <img src="01.webp" alt="" ></a></div>
            <div><a href="https://www.bilibili.com/video/BV1gC4y1a7EN?spm_id_from=333.5.b_646f7567615f6d6164.14"><img src="02.webp" alt=""></a></div>
            <div><a href="https://www.bilibili.com/video/BV1o64y167qq"><img src="03.webp" alt=""></a></div>
            <div><a href="https://www.bilibili.com/video/BV1UV411479m"><img src="04.webp" alt=""> </a></div>
        </section>

        <script>
            var tags=document.getElementsByTagName('li');
            var boxs=document.getElementsByTagName('div');
            for(var i=0;i<tags.length;i++){
                tags[i].index=i;
                tags[i].onclick=function(){
                    for(var j=0;j<tags.length;j++){
                        tags[j].className=''
                        boxs[j].className=''
                    }
                    this.className='current';
                    var n=this.index;
                    boxs[n].className='current'
                }
            }
        </script>
    </body>
</html>